As electronic communications technologies have advanced, there has been an increased desire for security from viruses, worms, spyware, and other malicious programs. One of the measures to prevent such harmful programs from affecting a host device, such as a computer, mobile telephone, personal digital assistant (PDA), is a firewall. Often, firewalls utilize firewall rules for one or more ports of a host device that are built and maintained statically by an administrator. However, with the proliferation of remote method invocation/remote procedure call (RMI/RPC) based applications, the port number to which these applications bind to may not be known a priori. Thus, often it may be difficult to configure the firewall rules for this class of applications.